// 导入joi
const joi = require('joi')
    // 定义姓名名称规则
const stu_name = joi.string().required()
    // 定义成绩规则
const stu_result = joi.number().integer().required()
    // 定义id的验证规则
const id = joi.number().integer().required()
    // 定义姓名名称规则
const stu_class = joi.string().required()

exports.add_results_schema = {
    body: {
        stu_name,
        stu_result,
        stu_class
    }
}
exports.update_results_schema = {
    body: {
        stu_name,
        stu_result,
        stu_class,
        id
    }
}

exports.get_results_schema = {
    query: {
        id
    }
}

exports.delete_results_schema = {
    body: {
        id
    }
}